﻿using Common;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SystemEntity;

namespace SystemRepository
{
    public class SystemUserRepository : TestDbRepository<SystemUserEntity>, IScoped
    {
        private readonly ILogger<SystemUserRepository> _logger;
        public SystemUserRepository(ILogger<SystemUserRepository> logger) : base(logger)
        {
            _logger = logger;
        }

        public SystemUserEntity Validate(string userName,string passWord,string clientId) 
        {
            SystemUserEntity userEntity = this.FirstOrDefault(t => t.UserName == userName && t.PassWord == passWord);
            return userEntity;
        }
    }
}
